<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.container.Clink</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.container.Clink");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791">tango.util.container.Clink</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Apr 2008: Initial release<br><br>
<b>Authors:</b><br>
Kris<br><br>
<b>Since:</b><br>0.99.7<br><br>        Based upon Doug Lea's Java collection package<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>struct <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L25">Clink</a></span>
<script>explorer.outline.addDecl('Clink');</script>(V);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Clinks are links that are always arranged in circular lists.</font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L40">set</a></span>
<script>explorer.outline.addDecl('set');</script>(V <span class="funcparam">v</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Set to point to ourselves
                        
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L54">set</a></span>
<script>explorer.outline.addDecl('set');</script>(V <span class="funcparam">v</span>, Ref <span class="funcparam">p</span>, Ref <span class="funcparam">n</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Set to point to n as next cell and p as the prior cell</font><br><br>
<b>param:</b><br>n, the new next cell<br><br>
<b>param:</b><br>p, the new prior cell<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L66">singleton</a></span>
<script>explorer.outline.addDecl('singleton');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Return true if current cell is the only one on the list
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L86">addNext</a></span>
<script>explorer.outline.addDecl('addNext');</script>(V <span class="funcparam">v</span>, Ref delegate() <span class="funcparam">alloc</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make a cell holding v and link it immediately after current cell
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L97">addPrev</a></span>
<script>explorer.outline.addDecl('addPrev');</script>(V <span class="funcparam">v</span>, Ref delegate() <span class="funcparam">alloc</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">make a node holding v, link it before the current cell, and return it
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L110">linkPrev</a></span>
<script>explorer.outline.addDecl('linkPrev');</script>(Ref <span class="funcparam">p</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">link p before current cell
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L125">size</a></span>
<script>explorer.outline.addDecl('size');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">return the number of cells in the list
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L141">find</a></span>
<script>explorer.outline.addDecl('find');</script>(V <span class="funcparam">element</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">return the first cell holding element found in a circular traversal starting
 at current cell, or null if no such
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L157">count</a></span>
<script>explorer.outline.addDecl('count');</script>(V <span class="funcparam">element</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">return the number of cells holding element found in a circular
 traversal
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L173">nth</a></span>
<script>explorer.outline.addDecl('nth');</script>(int <span class="funcparam">n</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">return the nth cell traversed from here. It may wrap around.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L187">unlinkNext</a></span>
<script>explorer.outline.addDecl('unlinkNext');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Unlink the next cell.
 This has no effect on the list if isSingleton&#40;&#41;
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L199">unlinkPrev</a></span>
<script>explorer.outline.addDecl('unlinkPrev');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Unlink the previous cell.
 This has no effect on the list if isSingleton&#40;&#41;
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L212">unlink</a></span>
<script>explorer.outline.addDecl('unlink');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Unlink self from list it is in.
 Causes it to be a singleton
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>Ref <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/container/Clink.d?rev=3791#L226">copyList</a></span>
<script>explorer.outline.addDecl('copyList');</script>(Ref delegate() <span class="funcparam">alloc</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make a copy of the list and return new head. 
</font><br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2008 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sat Aug  2 16:08:33 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>